import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

export default function visitStatisticsAPI(api) {
  return {
    // 获取最早登录时点趋势
    getEchartsOne: (query) => api.get(`${config.interfaces.type5}portfolio-server/accessStatistics/userRecord`, query),
    // 获取机构日均用户活跃度
    getEchartsTwo: (query) => api.get(`${config.interfaces.type5}portfolio-server/accessStatistics/activityMechanism`, query),
    // 获取功能分布
    getEchartsThree: (query) => api.get(`${config.interfaces.type5}portfolio-server/pmssaUge/distributionFunction`, query),
    // 获取TOP10热点功能
    getEchartsFour: (query) => api.get(`${config.interfaces.type5}portfolio-server/pmssaUge/hotFunction`, query),
    // 获取机构登录次数top5
    getTopFiveLogins: (query) => api.get(`${config.interfaces.type5}portfolio-server/accessStatistics/topFiveLogins`, query),
    // 获取交易日登录频次分布数据
    getLoginFrequency: (query) => api.get(`${config.interfaces.type5}portfolio-server/accessStatistics/loginFrequency`, query),
    // 获取登录总次数趋势图
    getTotalNumOfLogins: (query) => api.get(`${config.interfaces.type5}portfolio-server/accessStatistics/totalNumOfLogins`, query),
  };
}
